package com.my.lock;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;

@SpringBootApplication
@ServletComponentScan
public class LockApplication {

    public static void main(String[] args) {
        SpringApplication.run(LockApplication.class, args);
//        Config config = new Config();
//        config.useSingleServer().setAddress("redis://127.0.0.1:6379");
//        config.useSingleServer().setPassword("");
//        final RedissonClient client = Redisson.create(config);
//        RLock lock = client.getLock("lock1");
//        try{
//            lock.lock();
//        }finally{
//            lock.unlock();
//        }
    }

}
